//这里根据Linux的真正实现，实现一个新的page预测器
//http://os.51cto.com/art/200910/159067_all.htm

#ifndef REAL_PAGE_PREDICTOR_H
#define REAL_PAGE_PREDICTOR_H

#include <stdio.h>
#include <stdlib.h>

typedef struct __page_predictor{
    long last_access;
    //当前预测的大小
    int predictor_size;
}page_predictor_t;

void init_page_predictor(page_predictor_t* page_predictor);

void real_page_update(page_predictor_t* page_predictor, long now_access);

void real_page_predict(page_predictor_t* page_predictor, long *predictor_arr, int *size);

void real_page_predictor(page_predictor_t* page_predictor, long now_access, long *predictor_arr, int *size);

#endif